#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Author  :   JingV
@Version :   1.0
@Contact :   None
@License :   None
@Desc    :   None
'''


class Solution(object):
    def climbStairs(self, n):
        # 斐波拉契数列
        a, b = 1, 2
        if n == 1:
            return a
        if n == 2:
            return b
        for i in range(3, n + 1):
            a, b = b, a + b
        return b


def main():
    solution = Solution()
    tests = [2, 3, 4]
    for n in tests:
        print(solution.climbStairs(n))


if __name__ == "__main__":
    main()
